import { RequestType } from '~/config/enum/request-type.enum'
const CONTROLLER = 'product'
const SERVICE = 'service-product'

export default {
  /**
   * 查询所有未删除的产品
   */
  findAllPublicProductList: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'findAllPublicProductList',
    type: RequestType.Get
  },
  /**
   * 创建产品
   */
  addProduct: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'addProduct',
    type: RequestType.Post
  },
  /**
   * 编辑产品
   */
  updateProduct: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'updateProduct',
    type: RequestType.Put
  },
  /**
   * 删除产品
   */
  deleteProduct: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'deleteProduct',
    type: RequestType.Delete
  },
  /**
   * 发布产品
   */
  publicProduct: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'publicProduct',
    type: RequestType.Put
  },
  /**
   * 分页查询所有产品
   */
  findListByPage: {
    service: SERVICE,
    controller: CONTROLLER,
    action: 'findListByPage',
    type: RequestType.Get
  }
}
